package com.xl.juc.function;

import java.util.function.Supplier;

/**
 * 供给型接口 没有参数，只有返回值
 * @author Charley
 * @create 2021-01-24
 */
public class SupplierInterface {
    public static void main(String[] args) {
      /*  Supplier<Integer> supplier=   new Supplier<Integer>() {
            @Override
            public Integer get() {
                return 1024;
            }
        };*/
        Supplier<Integer> supplier=()->{return 1024;};
        System.out.println(supplier.get());
    }
}
